package cn.ording.entity;



/**
 * FoodOrderId entity. @author MyEclipse Persistence Tools
 */

public class FoodOrderId  implements java.io.Serializable {


    // Fields    

     private Food food;
     private Ordering ordering;


    // Constructors

    /** default constructor */
    public FoodOrderId() {
    }

    
    /** full constructor */
    public FoodOrderId(Food food, Ordering ordering) {
        this.food = food;
        this.ordering = ordering;
    }

   
    // Property accessors

    public Food getFood() {
        return this.food;
    }
    
    public void setFood(Food food) {
        this.food = food;
    }

    public Ordering getOrdering() {
        return this.ordering;
    }
    
    public void setOrdering(Ordering ordering) {
        this.ordering = ordering;
    }
   



   public boolean equals(Object other) {
         if ( (this == other ) ) return true;
		 if ( (other == null ) ) return false;
		 if ( !(other instanceof FoodOrderId) ) return false;
		 FoodOrderId castOther = ( FoodOrderId ) other; 
         
		 return ( (this.getFood()==castOther.getFood()) || ( this.getFood()!=null && castOther.getFood()!=null && this.getFood().equals(castOther.getFood()) ) )
 && ( (this.getOrdering()==castOther.getOrdering()) || ( this.getOrdering()!=null && castOther.getOrdering()!=null && this.getOrdering().equals(castOther.getOrdering()) ) );
   }
   
   public int hashCode() {
         int result = 17;
         
         result = 37 * result + ( getFood() == null ? 0 : this.getFood().hashCode() );
         result = 37 * result + ( getOrdering() == null ? 0 : this.getOrdering().hashCode() );
         return result;
   }   





}